home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-20 | 3.0 KB | 86 lines | [TEXT/GEOL] |
- Item forwarded by SCHMUCKER1 to DEREK
-
- Item 4706901 17-Oct-89 15:09
-
- From: LINS Lins, Chuck
-
- To: SCHMUCKER1 Schmucker, Kurt
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Object Modula-2 Compiler
-
- Kurt, and everyone else,
-
- Here's all the information I have at present on the Object Oriented Modula-2.
-
- The compiler is distributed by
- p1, Gesellschaft fur Informatik mbH
- Gotthardstr. 99
- D-8000 Munich 21
- West Germany
-
- The compiler runs under MPW as a tool. The Modula-2 compiler has numerous
- extensions the most important of which is object-oriented support ala Object
- Pascal. The compiler produces object code fully compatible with Object Pascal's
- (e.g., object's use the dispatch table and methods are implemented similarly).
- Definition modules for MacApp are provided with the compiler. These modules
- currently define interfaces to macApp 2.0B5. Rather than try and describe the
- syntax I'll just give an example.
-
- One declares an object type like this:
-
- TYPE
- TShape = OBJECT
- boundRect: Rect; (* an instance variable *)
- METHOD IShape; (* some methods *)
- METHOD Draw (pat: Pattern);
- ... etc ...
- END;
-
- TYPE
- TArc = OBJECT (TShape) (* a subclass of TShape *)
- startAngle, stopAngle: INTEGER;
- METHOD IArc;
- OVERRIDE METHOD Draw (pat: Pattern);
- ... etc ...
- END;
-
- Object variables are like those in Object Pascal. They're declared similarly,
- and there's no need to explicitly dereference them. Objects are allocated on
- the heap as handles. A special standard procedure GEN is used to create objects
- (like NEW does in Object Pascal). SELF and INHERITED woek just like their
- Pascal counterparts.
-
-
- In the non-object-oriented area, p1 Modula-2 supports further extensions to
- Modula-2 for the following constructs:
- * record aggregates
- * structured constants for records and arrays
- * multi-dimensional open array parameters
- * interfacing to other languages
- * conditional compilation
- * escape characters within strings (ala C)
- * symbolic debugger (kinda like Think Pascal's)
-
- There's probably a few things I've forgotten but that's the major parts.
-
- A large library of modules is provided (the MODUS library), as well as
- libraries supporting the Macintosh interface.
-
- MacApp is supported as mentioned previously. Currently, p1 provides the
- interfaces which conform with 2.0B5. There's a tool which converts the Pascal
- MacApp interfaces into corresponding Modula-2 interfaces but at this time it's
- not provided with the product (no fully documented, doesn't do a 100%
- conversion so some manual effort still required).
-
-
- I haven't had any chance to try out the compiler since my current projects at
- Apple don't involve MacApp. If you want more info, please link Elmar Henne at
- GER.XDV0002 and say you heard it here on MacApp.Tech$ !
-
- Chuck Lins
- Apple Computer, Inc.
- Disclaimer: The intersection of Apple's ideas and my ideas yields the empty set
-
-